package com.niit.beans;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class User {
    @Autowired
    private Dept dept;

    public void  teamwork(){
        // 为什么要注入dept的缘由
        dept.teambuilding();
    }
}